<template>
	<div>
		<el-table :data="sealData" :size="size" style="width: 100%;margin-bottom: 10px;" border>
			<el-table-column prop="updateAt" label="更新日期" align="center" width="140">
				<template slot-scope="scope">
					{{$lizhao.timeFormat(new Date(scope.row.updateAt).getTime(),'yyyy-mm-dd hh:MM:ss')}}
				</template>
			</el-table-column>
			<el-table-column label="相机功能" align="center">
				<el-table-column prop="camera.open" label="开启" width="140" align="center">
					<template slot-scope="scope" v-if="scope.row.camera&&scope.row.camera.open">
						<el-tag :effect="effect" v-if="scope.row.camera.open.ExecResult" :type="scope.row.camera.open.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.camera.open.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.camera.open.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.camera.open.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="buzzer.picture" label="拍照" width="180" align="center">
					<template slot-scope="scope" v-if="scope.row.camera&&scope.row.camera.picture">
						<div style="display: flex;">
							<div>
								<el-tag :effect="effect" v-if="scope.row.camera.picture.ExecResult" :type="scope.row.camera.picture.ExecResult?'success':'danger'"
								 :size="size">系统审核：{{scope.row.camera.picture.ExecResult?'正常':'异常'}}</el-tag>
								<el-tag :effect="effect" v-if="scope.row.camera.picture.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
								<el-tag :effect="effect" v-if="scope.row.camera.picture.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
							</div>
							<el-image :src="'data:image/png;base64,'+scope.row.camera.picture.ExecResult" style="width: 50px;height: 50px;"
							 :preview-src-list="['data:image/png;base64,'+scope.row.camera.picture.ExecResult]"></el-image>
						</div>
					</template>
				</el-table-column>
				<el-table-column prop="buzzer.close" label="关闭" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.camera&&scope.row.camera.close">
						<el-tag :effect="effect" v-if="scope.row.camera.close.ExecResult" :type="scope.row.camera.close.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.camera.open.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.camera.close.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.camera.close.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="蜂鸣器功能" align="center">
				<el-table-column prop="buzzer.open" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.buzzer">
						<el-tag :effect="effect" v-if="scope.row.buzzer.ExecResult" :type="scope.row.buzzer.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.buzzer.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.buzzer.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.buzzer.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="OLED功能" align="center">
				<el-table-column prop="OLED" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.OLED">
						<el-tag :effect="effect" v-if="scope.row.OLED.ExecResult" :type="scope.row.OLED.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.OLED.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.OLED.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.OLED.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="电机功能" align="center">
				<el-table-column prop="electric" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.electric&&scope.row.electric.open">
						<el-tag :effect="effect" v-if="scope.row.electric.open.ExecResult" :type="scope.row.electric.open.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.electric.open.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.electric.open.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.electric.open.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="electric" label="关闭" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.electric&&scope.row.electric.close">
						<el-tag :effect="effect" v-if="scope.row.electric.close.ExecResult" :type="scope.row.electric.close.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.electric.close.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.electric.close.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.electric.close.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="WIFI功能" align="center">
				<el-table-column prop="wifi" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.wifi&&scope.row.wifi.open">
						<el-tag :effect="effect" v-if="scope.row.wifi.open.ExecResult" :type="scope.row.wifi.open.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.wifi.open.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.wifi.open.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.wifi.open.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="wifi" label="WIFI_BT" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.wifi&&scope.row.wifi.WIFI_BT">
						<el-tag :effect="effect" type="success" :size="size">{{scope.row.wifi.WIFI_BT.ExecResult}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.wifi.WIFI_BT.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.wifi.WIFI_BT.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="wifi" label="关闭" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.wifi&&scope.row.wifi.close">
						<el-tag :effect="effect" v-if="scope.row.wifi.close.ExecResult" :type="scope.row.wifi.close.ExecResult=='0'?'success':'danger'"
						 :size="size">系统审核：{{scope.row.wifi.close.ExecResult=='0'?'正常':'异常'}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.wifi.close.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.wifi.close.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="按键功能" align="center">
				<el-table-column prop="button" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.button">
						<el-tag :effect="effect" v-if="scope.row.button.ExecResult.length==4" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.button.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.button.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="指纹功能" align="center">
				<el-table-column prop="button" label="通讯" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.fingerprint&&scope.row.fingerprint.communication">
						<el-tag :effect="effect" v-if="scope.row.fingerprint.communication.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.fingerprint.communication.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.fingerprint.communication.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="button" label="触摸" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.fingerprint&&scope.row.fingerprint.touch">
						<el-tag :effect="effect" v-if="scope.row.fingerprint.touch.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.fingerprint.touch.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.fingerprint.touch.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="FLASH功能" align="center">
				<el-table-column prop="button" label="flash" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.flash">
						<el-tag :effect="effect" v-if="scope.row.flash.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.flash.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.flash.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="舱体功能" align="center">
				<el-table-column prop="button" label="舱体" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.cabin">
						<el-tag :effect="effect" v-if="scope.row.cabin.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.cabin.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.cabin.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="盖章功能" align="center">
				<el-table-column prop="button" label="舱体" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.seal">
						<el-tag :effect="effect" v-if="scope.row.seal.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.seal.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.seal.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="防拆功能" align="center">
				<el-table-column prop="button" label="拆章按键" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.dismantleSeal">
						<el-tag :effect="effect" v-if="scope.row.dismantleSeal.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.dismantleSeal.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.dismantleSeal.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="LTE功能" align="center">
				<el-table-column prop="button" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.LTE&&scope.row.LTE.open">
						<el-tag :effect="effect" v-if="scope.row.LTE.open.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LTE.open.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LTE.open.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="button" label="开启" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.LTE&&scope.row.LTE.close">
						<el-tag :effect="effect" v-if="scope.row.LTE.close.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LTE.close.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LTE.close.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="读取功能" align="center">
				<el-table-column prop="read" label="APP版本" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.read&&scope.row.read.APP">
						<el-tag :effect="effect" type="success" :size="size">{{scope.row.read.APP.ExecResult}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.APP.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.APP.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="read" label="ROM版本" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.read&&scope.row.read.ROM">
						<el-tag :effect="effect" type="success" :size="size">{{scope.row.read.ROM.ExecResult}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.ROM.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.ROM.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="read" label="WIFI_MAC" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.read&&scope.row.read.WIFI_MAC">
						<el-tag :effect="effect" type="success" :size="size">{{scope.row.read.WIFI_MAC.ExecResult}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.WIFI_MAC.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.WIFI_MAC.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="read" label="BT_MAC" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.read&&scope.row.read.BT_MAC">
						<el-tag :effect="effect" type="success" :size="size">{{scope.row.read.BT_MAC.ExecResult}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.BT_MAC.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.BT_MAC.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="read" label="IMEI" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.read&&scope.row.read.IMEI">
						<el-tag :effect="effect" type="success" :size="size">{{scope.row.read.IMEI.ExecResult}}</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.IMEI.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.IMEI.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
				<el-table-column prop="read" label="电池电量" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.read&&scope.row.read.Q_Electric">
						<el-tag :effect="effect" v-if="scope.row.read.Q_Electric.ExecResult=='1'" type="success" :size="size">系统审核：25%</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.Q_Electric.ExecResult=='2'" type="success" :size="size">系统审核：50%</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.Q_Electric.ExecResult=='3'" type="success" :size="size">系统审核：75%</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.Q_Electric.ExecResult=='4'" type="success" :size="size">系统审核：100%</el-tag>
						<!-- <el-tag :effect="effect" type="success" :size="size">{{scope.row.read.Q_Electric.ExecResult}}</el-tag> -->
						<el-tag :effect="effect" v-if="scope.row.read.Q_Electric.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.read.Q_Electric.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="LED" align="center">
				<el-table-column prop="button" label="LED闪烁" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.LED&&scope.row.LED.flash">
						<el-tag :effect="effect" v-if="scope.row.LED.flash.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LED.flash.ExecResult=='2'" type="danger" :size="size">系统审核：失败</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LED.flash.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.LED.flash.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
			<el-table-column label="ping功能" align="center">
				<el-table-column prop="button" label="ping" width="120" align="center">
					<template slot-scope="scope" v-if="scope.row.ping">
						<el-tag :effect="effect" v-if="scope.row.ping.ExecResult=='0'" type="success" :size="size">系统审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.ping.ExecResult=='2'" type="danger" :size="size">系统审核：失败</el-tag>
						<el-tag :effect="effect" v-if="scope.row.ping.userIsSuccess==0" type="success" :size="size">人为审核：正常</el-tag>
						<el-tag :effect="effect" v-if="scope.row.ping.userIsSuccess==-1" type="danger" :size="size">人为审核：异常</el-tag>
					</template>
				</el-table-column>
			</el-table-column>
		</el-table>
	</div>
</template>

<script>
	let that
	import {
		mapGetters,
		mapState
	} from 'vuex'
	import bus from "/static/js/bus.js"
	export default {
		props: {
			sealData: {
				type: Array,
				default: () => {
					return []
				}
			},
		},
		name: 'sealData',
		components: {},
		computed: {
			...mapGetters(['size'])
		},
		data() {
			return {
				effect: 'dark'
			}
		},
		watch: {},
		mounted() {
			that = this
		},
		methods: {}
	}
</script>

<style>
</style>
